package com.hzit.sb2.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserItem implements Serializable {
    //{
    //    "subscribe": 1,
    //    "openid": "o6_bmjrPTlm6_2sgVt7hMZOPfL2M",
    //    "nickname": "Band",
    //    "sex": 1,
    //    "language": "zh_CN",
    //    "city": "广州",
    //    "province": "广东",
    //    "country": "中国",
    //    "headimgurl":"http://thirdwx.qlogo.cn/mmopen/g3MonUZtNHkdmzicIlibx6iaFqAc56vxLSUfpb6n5WKSYVY0ChQKkiaJSgQ1dZuTOgvLLrhJbERQQ4eMsv84eavHiaiceqxibJxCfHe/0",
    //    "subscribe_time": 1382694957,
    //    "unionid": " o6_bmasdasdsad6_2sgVt7hMZOPfL"
    //    "remark": "",
    //    "groupid": 0,
    //    "tagid_list":[128,2],
    //    "subscribe_scene": "ADD_SCENE_QR_CODE",
    //    "qr_scene": 98765,
    //    "qr_scene_str": ""
    //}
    private Integer subscribe;
    private String openid;
    private String nickname;
    private Integer sex;
    private String language;
    private String city;
    private String province;
    private String country;
    private String headimgurl;
    private Long subscribe_time;
    private String unionid;
    private String remark;
    private Integer groupid;
    private List<Integer> tagid_list;
    private String subscribe_scene;
    private String qr_scene;
    private String qr_scene_str;

    public String getDateTime(){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return sdf.format(new Date(this.subscribe_time));
    }
}
